﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>YourLayer</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<P><FONT face=Courier>Your Layer</FONT></P><B><FONT color=#7f0055 size=2>
<P><FONT face=Courier>public</FONT></B></FONT><FONT face=Courier><FONT size=2> 
</FONT><B><FONT color=#7f0055 size=2>void</B></FONT></FONT><FONT size=2><FONT 
face=Courier> draw(GL10 gl)<FONT 
color=#008000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //có 
thể vẽ những hình primitives 
tại đây ( dùng gl&nbsp;)</FONT>&nbsp;- tuy nhiên vẽ dạng này có vẻ như 
làm chậm chương trình  </FONT></FONT></P><FONT size=2><FONT face=Courier><FONT size=2>
<P align=left>CGSize s = CCDirector.<I>sharedDirector</I>().winSize(); </P>
<P align=left></P>
<P align=left>gl.glEnable(GL10.</FONT><I><FONT color=#0000c0 
size=2>GL_LINE_SMOOTH</I></FONT><FONT size=2>);</P>
<P align=left></P>
<P>CCDrawingPrimitives.<I>ccDrawLine</I>(gl, CGPoint.<I>ccp</I>(0, 0), 
CGPoint.<I>ccp</I>(s.</FONT><FONT color=#0000c0 size=2>width</FONT><FONT 
size=2>, s.</FONT><FONT color=#0000c0 size=2>height</FONT><FONT 
size=2>));</FONT></P>
<P><FONT 
size=2></FONT>&nbsp;</P>
<P><FONT 
size=2></FONT>&nbsp;</P><FONT 
size=2><FONT color=#646464 size=2>
<P align=left>@Override<BR></FONT><B><FONT color=#7f0055 
size=2>public</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 
size=2>boolean</B></FONT><FONT size=2> ccTouchesEnded(MotionEvent 
event)&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#008000>//nhận &amp; xử lý&nbsp;các 
event touch</FONT></P></FONT></FONT></FONT></FONT></body>
</html>
